<%@ page import="com.edu.imau.ManagerSeat.Seat" %>
<%@ page import="com.edu.imau.ParkingDao" %><%--
  Created by IntelliJ IDEA.
  User: 贾维斯
  Date: 2022/12/25
  Time: 16:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>车位信息管理界面</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- Bootstrap core CSS -->
    <link href="bootstrap-3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="navbar-fixed-top/navbar-fixed-top.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/dt-1.13.1/datatables.min.css"/>
</head>
<body>
<form class="form-inline" action="add3">
    <%--        <input type="hidden" name="id" value="<%= studentupdatae != null?studentupdatae.getId():""%>">--%>
    <input type="hidden" name="seat_id" value="${seat.seat_id}">
    <%--        <div class="form-group">--%>
    <%--            <label class="sr-only" style="width: 120px">序号</label>--%>
    <%--            <input type="text" class="form-control" name="id" id="id" placeholder="序号" style="width: 200px"value="${user.id}">--%>
    <%--        </div>--%>
    <div class="form-group">
        <label class="sr-only" style="width: 120px">车位ID</label>
        <input type="text" class="form-control" name="seat_code" id="seat_code" placeholder="车位ID" style="width: 300px"value="${seat.seat_code}">
    </div>
    <div class="form-group">
        <label class="sr-only" style="width: 120px">车位编号</label>
        <input type="text" class="form-control" name="seat_number" id="seat_number" placeholder="车位编号" style="width: 300px" value="${seat.seat_number}">
    </div><div class="form-group">
    <label class="sr-only" style="width: 50px" >所属区域</label>
    <input type="text" class="form-control" name="seat_section" id="seat_section" placeholder="所属区域" style="width: 300px"value="${seat.seat_section}">
</div><div class="form-group">
    <label class="sr-only" style="width: 120px">车位状态</label>
    <input type="text" class="form-control" name="seat_state" id="seat_state" placeholder="车位状态" style="width: 300px"value="${seat.seat_state}">
</div><div class="form-group">
    <label class="sr-only" style="width: 120px">车位备注</label>
    <input type="text" class="form-control" name="seat_tap" id="seat_tap" placeholder="车位备注" style="width: 300px"value="${seat.seat_tap}">
</div>
    <button type="submit" class="btn btn-default" href="seat.jsp">确定</button>
</form>
<hr>
<!-- Main component for a primary marketing message or call to action -->
<table id="example" class="table table-bordered table-hover">
    <thead>
    <th>序号</th>
    <th>车位ID</th>
    <th>车位编号</th>
    <th>所属区域</th>
    <th>车位状态</th>
    <th>车位备注</th>
<%--    <th>操作</th>--%>
    </thead>
    <tbody>
    <%Object list = request.getAttribute("data3");%>
    <%for(Seat seat:new ParkingDao().getSeatAll()){%>
    <tr>
        <td><%= seat.getSeat_id() %></td>
        <td><%= seat.getSeat_code() %></td>
        <td><%= seat.getSeat_number() %></td>
        <td><%= seat.getSeat_section() %></td>
        <td><%= seat.getSeat_state() %></td>
        <td><%= seat.getSeat_tap() %></td>
<%--        <td>--%>
<%--            <a class="btn btn-warning" href="update3?seat_id=<%= seat.getSeat_id() %>" role="button">修改</a>--%>
<%--            <a class="btn btn-danger" href="delete3?seat_id=<%= seat.getSeat_id()%>" role="button">删除</a>--%>

<%--        </td>--%>
    </tr>
    <%}%>
    </tbody>
</table>
</body>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/dt-1.13.1/datatables.min.js"></script>
<script>
    $(document).ready(function () {
        $('#example').DataTable();
    });
</script>
</html>
